<template>
  <div class="w-100 h-100">
    <CommonTable
      :table-data="tableData"
      :current-page.sync="page"
      :page-size.sync="size"
      :total="total"
      @monitorBtn="monitorBtn"
    />
    <!-- 监控信息详情 -->
    <MonitorDetail
      v-if="monitorVisible"
      :dialog-visible.sync="monitorVisible"
    />
  </div>
</template>
<script>
import CommonTable from "./components/CommonTable";
import MonitorDetail from "./components/MonitorDetail.vue";
import alarmData from "./data/alarm.js";
export default {
  components: {
    CommonTable,
    MonitorDetail,
  },
  data() {
    return {
      tableData: alarmData,
      page: 1,
      size: 20,
      total: 0,
      monitorVisible: false,
    };
  },
  methods: {
    monitorBtn(row) {
      this.tableSelected = row;
      this.monitorVisible = true;
    },
  },
};
</script>
